home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / dev / sun4.md / devConfig.c < prev    next >
C/C++ Source or Header  |  1991-07-15  |  4KB  |  101 lines

  1. /* 
  2.  * devConfig.c --
  3.  *
  4.  *    Configuration table for the devices in the system.  There is
  5.  *    a table for the possible controllers in the system, and
  6.  *    then a table for devices.  Devices are implicitly associated
  7.  *    with a controller.  This file should be automatically generated
  8.  *    by a config program, but it isn't.
  9.  *
  10.  * Copyright 1989 Regents of the University of California
  11.  * Permission to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose and without
  13.  * fee is hereby granted, provided that the above copyright
  14.  * notice appear in all copies.  The University of California
  15.  * makes no representations about the suitability of this
  16.  * software for any purpose.  It is provided "as is" without
  17.  * express or implied warranty.
  18.  */
  19.  
  20. #ifndef lint
  21. static char rcsid[] = "$Header: /sprite/src/kernel/dev/sun4.md/RCS/devConfig.c,v 9.6 90/10/19 15:40:19 mendel Exp $ SPRITE (Berkeley)";
  22. #endif not lint
  23.  
  24.  
  25. #include "sprite.h"
  26. #include "devInt.h"
  27. #include "scsiHBA.h"
  28. #include "devTypes.h"
  29.  
  30. /*
  31.  * Per device include files.
  32.  */
  33. #include "scsi3.h"
  34. #include "xylogics450.h"
  35. #include "jaguar.h"
  36. #include "devTMR.h"
  37.  
  38. /*
  39.  * The controller configuration table.
  40.  */
  41. DevConfigController devCntrlr[] = {
  42.    /* Name     Address,  Addr space, ID, InitProc   IntrVector  IntrRoutine. */
  43.     { "SCSI3",  0x200000, DEV_VME_D16A24, 0, DevSCSI3Init, 64, DevSCSI3Intr },
  44.     { "SCSI3#1",  0x210000, DEV_VME_D16A24, 1, DevSCSI3Init, 65, DevSCSI3Intr },
  45.     { "SCSI3#2",  0x220000, DEV_VME_D16A24, 2, DevSCSI3Init, 66, DevSCSI3Intr },
  46.     { "SCSI3#3",  0x230000, DEV_VME_D16A24, 3, DevSCSI3Init, 67, DevSCSI3Intr },
  47.     { "Xylogics450", 0xee40, DEV_VME_D16A16,     0, DevXylogics450Init,
  48.                     72, DevXylogics450Intr},
  49.     { "Jaguar0", 0x8800, DEV_VME_D16A16, 0, DevJaguarInit, 211, DevJaguarIntr},
  50.     { "Jaguar1", 0x9000, DEV_VME_D16A16, 1, DevJaguarInit, 215, DevJaguarIntr},
  51.     { "Jaguar2", 0x9800, DEV_VME_D16A16, 2, DevJaguarInit, 216, DevJaguarIntr},
  52.     { "Jaguar3", 0xc000, DEV_VME_D16A16, 3, DevJaguarInit, 217, DevJaguarIntr},
  53.     { "tmr0", 0xFFD14000, DEV_OBIO, 0, Dev_TimerProbe, 0, ((Boolean (*)())0)},
  54. };
  55. int devNumConfigCntrlrs = sizeof(devCntrlr) / sizeof(DevConfigController);
  56.  
  57. /*
  58.  * Table of SCSI HBA types attached to this system.
  59.  */
  60.  
  61. ScsiDevice *((*devScsiAttachProcs[]) _ARGS_((Fs_Device *devicePtr,
  62.         void (*insertProc) (List_Links *elementPtr,
  63.                                     List_Links *elementListHdrPtr)))) = {
  64.     DevSCSI3AttachDevice,        /* SCSI Controller type 0. */
  65.     DevNoHBAAttachDevice,        /* SCSI Controller type 1. */
  66.     DevJaguarAttachDevice,        /* SCSI Controller type 2. */
  67. };
  68. int devScsiNumHBATypes = sizeof(devScsiAttachProcs) / 
  69.              sizeof(devScsiAttachProcs[0]);
  70.  
  71. /*
  72.  * A list of disk devices that is used when probing for a root partition.
  73.  * The choices are:
  74.  * Drive 0 partition 0 of xylogics 450 controller 0.
  75.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI3 HBA 0. 
  76.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI3 HBA 1. 
  77.  */
  78. Fs_Device devFsDefaultDiskPartitions[] = { 
  79.     { -1, DEV_XYLOGICS, 0, (ClientData) NIL },    
  80.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 0),
  81.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 0),
  82.         (ClientData) NIL }, 
  83.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 2),
  84.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 2),
  85.         (ClientData) NIL }, 
  86.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 0, 0, 0),
  87.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 0, 0, 0),
  88.         (ClientData) NIL }, 
  89.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 0, 0, 2),
  90.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 0, 0, 2),
  91.         (ClientData) NIL }, 
  92.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 4, 0, 0),
  93.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 4, 0, 0),
  94.         (ClientData) NIL }, 
  95.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 4, 0, 2),
  96.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 1, 4, 0, 2),
  97.         (ClientData) NIL }, 
  98.     };
  99. int devNumDefaultDiskPartitions = sizeof(devFsDefaultDiskPartitions) / 
  100.               sizeof(Fs_Device);
  101.